<template>
  <div>
    <div v-for="(item,idx) in list" :key="idx">
      <slot
        :bookname="item.name"
        :price="item.price"
        :author="item.author"
        :img="item.img"
      >
        <p>书名：{{ item.name }}  作者：{{ item.author }} 价格：{{ item.price }}</p>
      </slot>
    </div>
  </div>
</template>
<script>
export default {
  props: { list: { type: Array, required: true }}
}
</script>
